//
//  TabalViewController.m
//  艾听歌
//
//  Created by dllo on 16/5/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TabalViewController.h"

@interface TabalViewController ()
@property(nonatomic, strong) NSMutableArray *dataArr;

@property (nonatomic, strong) UIWebView *web;

@end

@implementation TabalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    self.view.backgroundColor = [UIColor whiteColor];
    
    //导航栏上的标题
    UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(self.view.frame.size.width - 20, 10, 40, 30)];
    //    title.text = self.naviTitle;
    title.text = self.proModel.text;
    title.textColor = [UIColor whiteColor];
    title.textAlignment = NSTextAlignmentCenter;
    self.navigationItem.titleView = title;
    
    
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:(UIBarButtonItemStylePlain) target:self action:@selector(back)];
    
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
    
    
    //加载web
    NSString *str = self.proModel.url;
    UIWebView *wv = [[UIWebView alloc] initWithFrame:self.view.frame];
    
    [self.view addSubview:wv];
    
    //加载数据
    NSURL *url = [NSURL URLWithString:str];
    NSURLRequest *req = [NSURLRequest requestWithURL:url];
    [wv loadRequest:req];
    
    

}





- (void)back {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
